﻿using System;
using System.Collections.Generic;
using Loki.Data;

namespace Luna.Data.Configuration
{
    /// <summary>
    /// Configuration data provider.
    /// </summary>
    public interface IConfigurationProvider : IDataProvider
    {
        #region Database management

        /// <summary>
        /// Creates the new store.
        /// </summary>
        /// <param name="storePath">Path of the store.</param>
        void CreateNewStore(string storePath);

        /// <summary>
        /// Opens the existing store.
        /// </summary>
        /// <param name="storePath">Path of the store.</param>
        void OpenExistingStore(string storePath);

        /// <summary>
        /// Moves the current store to the specified location.
        /// </summary>
        /// <param name="storePath">The store new path.</param>
        void MoveCurrentStoreTo(string storePath);

        void CloseCurrentStore();

        #endregion Database management

        #region Connectors

        /// <summary>
        /// Gets all connectors.
        /// </summary>
        /// <returns>All defined connectors.</returns>
        IEnumerable<IConnectorData> GetAllConnectors();

        /// <summary>
        /// Gets the connector.
        /// </summary>
        /// <param name="connectorID">The connector ID.</param>
        /// <returns>The speicifed connector configuration.</returns>
        IConnectorData GetConnector(Guid connectorID);

        /// <summary>
        /// Saves the connector configuration.
        /// </summary>
        /// <param name="connector">The connector configuration.</param>
        void SaveConnector(IConnectorData connector);

        /// <summary>
        /// Deletes the connector configuration.
        /// </summary>
        /// <param name="connectorID">The connector ID.</param>
        void DeleteConnector(Guid connectorID);

        #endregion Connectors
    }
}